package genercis;

public class StudenComparator  implements Comparator{
    @Override
    public Integer compare(Object o1, Object o2) {
        if(o1 instanceof Student && o2 instanceof Student){
            return ((Student) o1).getAge() - ((Student) o2).getAge();
        }
        return null;
    }
}
